Ext.define('EUF.view.StudentForm', {
	extend : 'Ext.form.Panel',
	alias :'widget.studentForm',
	//id:'studentForm',
	
    tbar : ['->', {
		xtype: 'button',
		text: 'Save',
		id: 'studentSave',
		cls: 'button-link',
		style: '{font-size:12px;color:white;font-weight:bold}',
        //xtype: 'image',
        //height: 48,
        //padding: 10,
        //width: 48,
        //src: 'images/cross.png'
    }],
	initComponent: function() {
        var me = this;
        me.items = [
		{
			xtype: 'container',
            layout: {
                type: 'column'
            },
            items: [
                {
                    xtype: 'container',
                    columnWidth: 0.5,
                    items: [
                        {
                            xtype: 'container',
                            
                            margin: 70,
                            width: 300,
                            
                           
                            layout: {
                                type: 'column'
                            },
                            items: [
                                {
                                    xtype: 'fieldcontainer',
                                    height: 70,
                                    width: 68,
                                    layout: {
                                        align: 'stretch',
                                        type: 'vbox'
                                    },
                                    fieldLabel: '',
                                    columnWidth: 0.14,
                                    items: [
                                        {
                                            xtype: 'image',
                                            margin: '',
                                            padding: '',
                                            src: 'images/request.png',
                                            flex: 1
                                        },
                                        {
                                            xtype: 'label',
                                            height: 3,
                                            margin: '0 0 0 2',
                                            width: 24,
                                            text: 'Name',
                                            flex: 1
                                        }
                                    ]
                                },
                                {
                                    xtype: 'textfield',
								//	store: 'SubmitRequestStore',
                                    margin: '10 0 0 25',
                                    overCls:'shadow',
									name:'studentName',
                                   
                                   
                                    fieldLabel: '',                                          
                                                                              
                                    columnWidth: 0.81,
                                    listeners: {
                                        render: function() {
                                            this.getEl().on('mouseenter', function(){
                                                // 500 - is the select timeout
                                                this.timeout = setTimeout(this.timeoutHandler.bind(this), 200);
                                            }, this);
                                            this.getEl().on('mouseleave', function(){
                                                clearTimeout(this.timeout);
                                            }, this);
                                        }
                                    },
                                    timeoutHandler: function() {
                                        this.selectText();
                                        this.focus();
                                    },
                                }
                            ]
                        },
                        {
                            xtype: 'container',
                            
                            height: 81,
                            
                            margin: 70,
                            
                            width: 318,
                            layout: {
                                type: 'column'
                            },
                            items: [
                                {
                                    xtype: 'fieldcontainer',
                                    height: 70,
                                    width: 68,
                                    layout: {
                                        align: 'stretch',
                                        type: 'vbox'
                                    },
                                    fieldLabel: '',
                                    columnWidth: 0.14,
                                    items: [
                                        {
                                            xtype: 'image',
                                            margin: '',
                                            padding: '',
                                            src: 'images/request.png',
                                            flex: 1
                                        },
                                        {
                                            xtype: 'label',
                                            height: 35,
                                            margin: '',
                                            padding: '',
                                            width: 40,
                                            text: 'Class',
                                            flex: 1
                                        }
                                    ]
                              },                                                                                
                                        
                                
                                {
                                    xtype: 'combobox',
                                    name:'className',
                                    displayField : 'classDesc',
                                    valueField : 'className',
									store: 'ClassStore',
                                    margin: '10 0 0 25',
                                    fieldLabel: '',
                                    overCls: 'shadow',
                                    
                                    columnWidth: 0.81,
                                    listeners: {
                                        render: function() {
                                            this.getEl().on('mouseenter', function(){
                                                // 500 - is the select timeout
                                                this.timeout = setTimeout(this.timeoutHandler.bind(this), 500);
                                            }, this);
                                            this.getEl().on('mouseleave', function(){
                                                clearTimeout(this.timeout);
                                            }, this);
                                        }
                                    },
                                    timeoutHandler: function() {
                                        this.selectText();
                                        this.focus();
                                    },
                                },
                             
                            ]
                        }
                    ]
                },
                {
                    xtype: 'container',
                    columnWidth: 0.5,
                    items: [
                        {
                            xtype: 'container',
                            
                            margin: '60 70 70 70',
                            width: 300,
                            
                            layout: {
                                type: 'column'
                            },
                            items: [
                                {
                                    xtype: 'fieldcontainer',
                                    height: 70,
                                    width: 68,
                                    layout: {
                                        align: 'stretch',
                                        type: 'vbox'
                                    },
                                    fieldLabel: '',
                                    columnWidth: 0.16,
                                    items: [
                                        {
                                            xtype: 'image',
                                            margin: '',
                                            padding: '',
                                            src: 'images/userdetails.png',
                                            flex: 1
                                        },
                                        {
                                            xtype: 'label',
                                            height: 3,
                                            width: 30,
                                            text: 'Admission No',
                                            flex: 1
                                        }
                                    ]
                                },
                                {
                                    xtype: 'textfield',
                                    name:'admNo',
                                    margin: '10 0 0 25',
                                    fieldLabel: '',
                                    overCls: 'shadow',
                                    columnWidth: 0.81,
                                    listeners: {
                                        render: function() {
                                            this.getEl().on('mouseenter', function(){
                                                // 500 - is the select timeout
                                                this.timeout = setTimeout(this.timeoutHandler.bind(this), 200);
                                            }, this);
                                            this.getEl().on('mouseleave', function(){
                                                clearTimeout(this.timeout);
                                            }, this);
                                        }
                                    },
                                    timeoutHandler: function() {
                                        this.selectText();
                                        this.focus();
                                    },
                                    
                                }
                            ]
                        },
                        {
                            xtype: 'container',
                            margin: '70 70 70 60',
                            width: 480,
                            selectOnFocus: true,
                           
                            layout: {
                                type: 'column'
                            },
                            items: [
                                {
                                    xtype: 'fieldcontainer',
                                    height: 80,
                                    layout: {
                                        align: 'stretch',
                                        type: 'vbox'
                                    },
                                    fieldLabel: '',
                                    columnWidth: 0.13,
                                    items: [
                                        {
                                            xtype: 'image',
                                            height: 60,
                                            margin: '',
                                            
                                            padding: '',
                                            width: 60,
                                            src: 'images/notes.png'
                                        },
                                        {
                                            xtype: 'label',
                                            
                                            margin: '',
                                            text: 'Roll No',

                                            flex: 1,
                                            margins: '0 0 0 14',
											
                                        }
                                    ]
                                },
                                
                                
                                {
                                    xtype: 'textfield',
                                   // height: 76,
                                    overCls: 'shadow',
                                    margin: '3 0 0 19',
                                    resizable: true,
                                    
                                    columnWidth: 0.51,
									name:'rollNo',
									listeners: {
							            render: function() {
							                this.getEl().on('mouseenter', function(){
							                    // 500 - is the select timeout
							                    this.timeout = setTimeout(this.timeoutHandler.bind(this), 200);
							                }, this);
							                this.getEl().on('mouseleave', function(){
							                    clearTimeout(this.timeout);
							                }, this);
							            }
							        },
							        timeoutHandler: function() {
							            this.selectText();
							            this.focus();
							        },
                                }
                            ]
                        },
                        
                        {
                            xtype: 'container',
                            margin: '70 70 70 60',
                            width: 480,
                            selectOnFocus: true,
                           
                            layout: {
                                type: 'column'
                            },
                            items: [
                                {
                                    xtype: 'fieldcontainer',
                                    height: 80,
                                    layout: {
                                        align: 'stretch',
                                        type: 'vbox'
                                    },
                                    fieldLabel: '',
                                    columnWidth: 0.13,
                                    items: [
                                        {
                                            xtype: 'image',
                                            height: 60,
                                            margin: '',
                                            
                                            padding: '',
                                            width: 60,
                                            src: 'images/notes.png'
                                        },
                                        {
                                            xtype: 'label',
                                            
                                            margin: '',
                                            text: 'Batch',

                                            flex: 1,
                                            margins: '0 0 0 14',
											
                                        }
                                    ]
                                },
                                
                                
                                
                                {
                                    xtype: 'textfield',
                                   // height: 76,
                                    overCls: 'shadow',
                                    margin: '3 0 0 19',
                                    resizable: true,
                                    
                                    columnWidth: 0.51,
									name:'batch',
									listeners: {
							            render: function() {
							                this.getEl().on('mouseenter', function(){
							                    // 500 - is the select timeout
							                    this.timeout = setTimeout(this.timeoutHandler.bind(this), 200);
							                }, this);
							                this.getEl().on('mouseleave', function(){
							                    clearTimeout(this.timeout);
							                }, this);
							            }
							        },
							        timeoutHandler: function() {
							            this.selectText();
							            this.focus();
							        },
                                }
                            ]
                        }
                    ]
                }
            ]
		}];
		me.callParent(arguments);
    }, 
	
});
